﻿using UnityEngine;
using System.Collections;

public class UIController : MonoBehaviour {

	public BoardManager Manager;

	// for now, we'll use GUI buttons
	void OnGUI()
	{
		if (GUI.Button (new Rect (100, 100, 200, 50), "End Action"))
						Manager.EndAction ();
		if (GUI.Button (new Rect (100, 200, 200, 50), "End Turn"))
						Manager.EndTurn ();
		if (Manager.GameOver) 
		{
			if(!Manager._isOppositionGeneralDead)
				GUI.TextField(new Rect(Screen.width*0.5f-50,250,100,30),"Opposition Wins!");
			else if(!Manager._isChallengerGeneralDead)
				GUI.TextField(new Rect(Screen.width*0.5f-50,250,100,30),"Challenger Wins!");
			else
				GUI.TextField(new Rect(Screen.width*0.5f-50,250,100,30),"Tie Game!");

			if(GUI.Button(new Rect(Screen.width*0.5f-50,550,150,100),"Play Again"))
				Manager.ResetGame();
		}
	}
	// Use this for initialization
	void Start () {
		Screen.fullScreen = false;
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
